Skip to content

[refactor] #137/데이터 로딩 시 layout shift 방지#141

Merged
codeit-kkm merged 1 commit intomainfrom
refactor/#130/data-fetching-error-loading
Apr 21, 2025
Merged

[refactor] #137/데이터 로딩 시 layout shift 방지#141
codeit-kkm merged 1 commit intomainfrom
refactor/#130/data-fetching-error-loading

Conversation

@hyeonjiroh
Copy link
Owner

#️⃣ Issue Number

#137


📝 요약

원래는 loading 상태일 때 <p>Loading...</p>를 리턴해서 로딩 상태를 보여줬는데, 이 방식을 사용하면 데이터가 로드된 후 레이아웃이 밀리는 layout shift가 발생했다.
그래서 렌더링 반환 대신, 데이터 패칭 함수 내부에서 return;으로 조기 종료하는 방식으로 변경했다.
이를 통해 UI 구조를 유지한 채 로딩 처리만 할 수 있어서 시각적으로 더 안정적이게 되었다.


🛠️ PR 유형

  • 새로운 기능 추가
  • 버그 수정
  • CSS 등 사용자 UI 디자인 변경
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 변수명 변경 등)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

@hyeonjiroh hyeonjiroh self-assigned this Apr 18, 2025
@vercel
Copy link

vercel bot commented Apr 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
taskify ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2025 11:42am

@github-actions github-actions bot requested review from ARON-Y and codeit-kkm April 18, 2025 11:42
Copy link
Collaborator

@ARON-Y ARON-Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다~

Copy link
Collaborator

@codeit-kkm codeit-kkm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다

@codeit-kkm codeit-kkm merged commit 8ed7dc3 into main Apr 21, 2025
3 checks passed
@codeit-kkm codeit-kkm deleted the refactor/#130/data-fetching-error-loading branch April 21, 2025 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants